<?php
$redis = new Redis();  
$ret = $redis->connect("localhost","6379");  //php客户端设置的ip及端口
$redis->auth(REDIS_PASS);

$lnpan_search_log_queue_key = 'LNPAN_SEARCH_LOG_QUEUE';

while(true) {
	$redis->select(0);
	$log = $redis->rPop($lnpan_search_log_queue_key);

	if($log) {
		$redis->select(1);
		$redis->lPush($lnpan_search_log_queue_key, $log);
	}
	else {
		echo 'end';
		break;
	}

	$total = $redis->lSize($lnpan_search_log_queue_key);
	echo $total . PHP_EOL;
}
